<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>事件处理</title>
    <script src="./js/vue.js"></script>
</head>
<body>
    <div id="root">
        <button v-on:click="say('hi')">say hi</button>
    </div>
</body>
<script>
    Vue.config.productionTip = false
    const x = new Vue({
        data() {
            return {
                counter: 0
            }
        },
        methods: {
            say: function(message) {
                alert(message)
            }
        }
    }).$mount("#root")
</script>
</html>